Skip to content

chore: osv-worker deployment#4175

Merged
joanagmaia merged 2 commits into
mainfrom
chore/osv-worker-deployment
Jun 9, 2026
Merged

chore: osv-worker deployment#4175
joanagmaia merged 2 commits into
mainfrom
chore/osv-worker-deployment

Conversation

@joanagmaia

@joanagmaia joanagmaia commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces support for a new osv-worker service in the packages infrastructure. The main changes include adding Docker and service configuration for the new worker, updating build scripts, and integrating new start and development scripts. Additionally, the OSV sync workflow is updated to use its dedicated task queue.

New osv-worker service integration:

  • Added a new Docker Compose YAML file (osv-worker.yaml) to define the osv-worker and osv-worker-dev services, including environment variables, build context, and volume mounts for development.
  • Updated the list of services in packages.env to include osv-worker for Docker builds.

Script and workflow updates:

  • Added new npm scripts in package.json for starting and developing the osv-worker, including local development variants. [1] [2]
  • Changed the taskQueue in scheduleOsvSync from packages-worker to osv-worker to route OSV sync jobs to the new worker.

Note

Medium Risk
Changing the scheduled workflow task queue requires deploying osv-worker before or with this change; otherwise daily OSV sync jobs will not be picked up until the new worker is running.

Overview
Splits OSV advisory sync onto a dedicated Temporal worker (osv-worker) instead of the shared packages-worker queue.

Adds deployment plumbing: osv-worker in packages.env image builds, a new osv-worker.yaml Compose stack (prod + dev with lib volume mounts), and start/dev/local npm scripts. A new osv-worker.ts entrypoint registers the daily OSV schedule on startup then runs the worker. scheduleOsvSync now targets task queue osv-worker, so scheduled osvSync workflows only run when this service is deployed and listening on that queue.

Reviewed by Cursor Bugbot for commit ec0769a. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
@joanagmaia joanagmaia requested review from Copilot and mbani01 June 5, 2026 15:33
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a dedicated Temporal worker service (osv-worker) for OSV advisory sync within the packages_worker app, moving OSV scheduled workflow executions off the shared packages-worker queue.

Changes:

  • Route the OSV sync schedule to the osv-worker Temporal task queue.
  • Add a new osv-worker entrypoint plus start/dev scripts to run it.
  • Add Docker Compose service definitions and include osv-worker in the packages build service list.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
services/apps/packages_worker/src/osv/schedule.ts Updates the OSV schedule’s taskQueue to osv-worker.
services/apps/packages_worker/src/bin/osv-worker.ts Adds a dedicated worker entrypoint that initializes the service, registers the OSV schedule, then starts the worker.
services/apps/packages_worker/package.json Adds start:osv-worker, dev:osv-worker, and dev:osv-worker:local scripts.
scripts/services/osv-worker.yaml Adds compose definitions for osv-worker and osv-worker-dev.
scripts/builders/packages.env Adds osv-worker to the packages services build list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 58 to 62
action: {
type: 'startWorkflow',
workflowType: osvSync,
taskQueue: 'packages-worker',
taskQueue: 'osv-worker',
// Headroom for npm (~1 hour today) + Maven (~5 minutes) + derive
…oyment

Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ec0769a. Configure here.

type: 'startWorkflow',
workflowType: osvSync,
taskQueue: 'packages-worker',
taskQueue: 'osv-worker',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing schedule keeps old queue

Medium Severity

This change routes new osv-advisories-sync schedules to osv-worker, but scheduleOsvSync only calls create and treats ScheduleAlreadyRunning as success without updating the action. Environments that already registered the schedule still start workflows on packages-worker, so the new osv-worker deployment may never receive scheduled OSV sync runs until the Temporal schedule is recreated or updated manually.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ec0769a. Configure here.

@joanagmaia joanagmaia merged commit 48593db into main Jun 9, 2026
15 checks passed
@joanagmaia joanagmaia deleted the chore/osv-worker-deployment branch June 9, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants